﻿ 

	
<!DOCTYPE html>  
<%@page import="com.hh.bss.util.StringHelper" %>
<%
  String companyId=request.getParameter("companyId");  
  
  if (StringHelper.isEmpty(companyId)) companyId="0";
  
%> 
<html>  
<head>  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
    <meta name="keywords" content="公司">  
    <meta name="description" content="公司">  
    <title>公司组织架构</title>  
    
    <%@ include file="/WEB-INF/inc/default.jsp"%>
    <jsp:include page="/WEB-INF/inc/dic.jsp"/>

</head>  
<body>  
    
      
    <ul id="tt" class="easyui-tree" data-options="url:'/customer/company/companyorg.do?companyId=<%=companyId%>',animate:true
    	,onContextMenu: function(e,node){
                e.preventDefault();
                $(this).tree('select',node.target);
                //alert(node.id);
                //console.log(node);
                //console.log(node.attributes.companyNodeType);
                test();
                /*
                if (node.id == 'rootNode') {
                     $('#mm_root').menu('show',{
                       left: e.pageX,
                       top: e.pageY
                     });
                  
                }else if (node.attributes.companyNodeType == 'DEPT') {
                     
                     $('#mm_dept').menu('show',{
                       left: e.pageX,
                       top: e.pageY
                     });
                     
                     //addDept(node);
                  
                }*/
                
                
            }
    	"></ul>  
     

    <div id="mm_dept" class="easyui-menu" style="width:120px;">
        <div onclick="test()" data-options="iconCls:'icon-add'">新增部门</div>
     
    </div>
   
    
     <div id="dlg-dept" class="easyui-dialog" style="width:600px;height:280px;padding:10px 20px"  
            closed="true" buttons="#dlg-buttons" >  
        <form id="fm-dept" method="post" novalidate>  
        	  	  	 <input type="hidden" name="id" > 
        	  	  	 <input type="hidden" name="companyId" >
        	  	  	 
	        		     <div class="fitem">  
                     <label style="width:100px">名称<font color="red">*</font>:</label>                                            
                     <input name="name" class="easyui-box easyui-validatebox"  required="true">                       
                   </div> 
	        		     <div class="fitem">  
                     <label style="width:100px">备注:</label>                      
                     <textarea name="comment" style="height:60px;width:150px"></textarea>
                   </div> 	        		             		     	        		     
        </form>  

    </div> 
   
<div id="dlg-buttons">  
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="save('fm-dept','dlg-dept')">Save</a>  
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Cancel</a>  
    </div>
    <script type="text/javascript">
    	 function test(){
    	 	 alert('aa');
    	 }	
    	 
    </script>	
</body>  
</html>